import React from 'react';
import ReactEcharts from 'echarts-for-react';

var createReactClass = require('create-react-class');
const Scan = createReactClass({
  propTypes: {},
  getOtion: function() {
    const option = {
      angleAxis: {},
      radiusAxis: {
        type: 'category',
        data: ['已巡检'],
        z: 30,
      },
      polar: {},
      series: [
        {
          type: 'bar',
          data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
          coordinateSystem: 'polar',
          name: '已巡检',
          stack: '已巡检',
        },
        {
          type: 'bar',
          data: [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26,
            27,
            28,
            29,
            30,
            31,
            32,
            33,
            34,
            35,
          ],
          coordinateSystem: 'polar',
          name: '应巡检',
          stack: '应巡检',
        },
      ],
      legend: {
        show: true,
        data: ['已巡检', '应巡检'],
      },
    };
    return option;
  },
  render: function() {
    return (
      <ReactEcharts
        option={this.getOtion()}
        theme="dark"
        style={{ height: '99%', width: '100%' }}
        className="react_for_echarts"
      />
    );
  },
});

export default Scan;
